<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="../../vue.js"></script>
</head>

<body>
  <div id="app">
    <span v-if="show" :title="msg"> {{msg}}</span>
    <button @click="show?show=false:show=true">click</button>

    <br>
    <input type="text" v-model="msg" />
    <span>{{ newmsg }}</span>
  </div>

</body>
<script>

  var vm = new Vue({
    el: '#app',
    data: {
      show: false,
      msg: 'hello word'
    },
    computed: {
      newmsg() {
        return this.msg.split('').reverse().join('');
      }
    }
  })



</script>

</html>